luci-app-antiblock: Disable routes without deleting
authorKhachatryan Karen <[email protected]>
Tue, 27 May 2025 18:53:04 +0000 (21:53 +0300)
committerPaul Donald <[email protected]>
Sat, 31 May 2025 21:44:11 +0000 (23:44 +0200)
1) Added the ability to disable routes without deleting them.

Signed-off-by: Khachatryan Karen <[email protected]>
(cherry picked from commit 0a09ae1805f3e1184ad67ebb9a47b00c020c8b27)

applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js
applications/luci-app-antiblock/po/templates/antiblock.pot

index 65ceea5c3c6485ef3c45e3e0bd9bbb61b02796aa..215885670bf25a8fb3d8b722e1e07b576f39674e 100644 (file)
@@ -21,6 +21,10 @@ return view.extend({
         o = s.option(form.Value, 'domains_path', _('Domains path'), _('Domains path/URL. If you want to add domains via LuCI, specify the files in the /etc/antiblock folder.'));
         o.default = '/etc/antiblock/';
 
+        o = s.option(form.Flag, 'enabled', _('Enable'));
+        o.default = o.enabled;
+        o.editable = true;
+
         return m.render();
     }
 });
index f448a70fb0a523bfe069acd9d96a2844e2bd9da3..d878cd340e9ba93cbed9719edf4479008d2e5fa5 100644 (file)
@@ -38,6 +38,10 @@ msgstr ""
 msgid "Domains path:"
 msgstr ""
 
+#: applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js:24
+msgid "Enable"
+msgstr ""
+
 #: applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/args.js:13
 msgid "Enabled"
 msgstr ""